﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using UI.Lib.Factory;
using UI.Lib.Set;
using UI.ParentForm;
using Components;
using UI.Lib;

namespace UI.StorageManagement
{
    public partial class FrmOrdPreDoc : BasePrint
    {
        public FrmOrdPreDoc()
        {
            InitializeComponent();

            this.Text = "配货单打印";
        }

        protected override void SetParam()
        {
            var listid = base.GetParamByKey("listid");

            var shopid = CommonHelper.Entity.ExecFunScalar("getordershop", QB.Entity.AddParam("listid", listid));

            this.ReportType = ShopSetting.PrintPrice(shopid) ? "" : "NP"; //UI.Lib.Context.GlobalBoolean("5") ? "" : "NP";
        }

        protected override DataTable SetReportSummaryData()
        {
            return UI.Lib.Factory.CommonHelper.Entity.ExecFun("printpredocnosm", new KeyValuePair<string, object>("listid", base.GetParamByKey("listid")));
        }

        //返回明细数据
        protected override DataTable SetReportDetailData()
        {
            return UI.Lib.Factory.CommonHelper.Entity.ExecFun("printpredocno", new KeyValuePair<string, object>("listid", base.GetParamByKey("listid")));
        }
    }
}